package com.lagou.feign;

import com.lagou.common.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@Component
@FeignClient(value = "lagou-service-code", fallbackFactory = CodeServiceFeignFallBack.class, path = "/code")
public interface CodeServiceFeignClient {

    @PostMapping(value = "/validate/{email}/{code}")
    ResponseResult<Integer> validateCode(@PathVariable("email") String email, @PathVariable("code") String code);
}
